﻿
@{
    ViewBag.Title = "LevelThree";
    Layout = "~/Views/Shared/_Index_Layout.cshtml";
}

<table style="width:98%" class="formtable">
    <tbody>
        <tr>
            <td>
                <div title="日进煤详情" class="easyui-panel" style="padding:0px;width:98%">
                    <table id="StatList" style="padding:0px;width:100%"></table>
                </div>
            </td>
        </tr>
    </tbody>
</table>
<script type="text/javascript">
    $(function () {
        $('#StatList').datagrid({
            url: '@Url.Action("QueryRCPlanWeighting")',
            width:SetGridWidthSub(30),
            methord: 'post',
            height: SetGridHeightSub(40),
            fitColumns: true,
            sortName: 'SUPPLIER_ID',
            sortOrder: 'desc',
            idField: 'SUPPLIER_ID',
            pagination: false,
            striped: true, //奇偶行是否区分
            singleSelect: true,//单选模式
            onLoadSuccess: function(data) {
            },
            columns: [[
                { field: 'PLAN_DATE', title: '计划日期', width: 110,formatter:DateTimeFormatterToDate },
                { field: 'LPR', title: '车牌号', width: 90 },
                { field: 'SUPPLIER_NAME', title: '供应商', width: 220 },
                { field: 'TRANSPORT_NAME', title: '运输商', width: 220 },
                { field: 'MATERIEL_NAME', title: '物料名称', width: 100 },
                { field: 'BILL_WEIGHT', title: '票重', width: 60},
                { field: 'GROSS', title: '毛重', width: 50},
                { field: 'TARE', title: '皮重', width: 50},
                { field: 'NET', title: '净重', width: 50},
                { field: 'COEFFECENT', title: '扣吨', width: 50},
                { field: 'BALANCE', title: '验收量', width: 70 }
            ]]
             , onClickRow: function (index, row) {
                 if (row != null) {
                     parent.parent.ShowGradChildReportWindow("@Url.Action("LevelTwo")?LPR="+row.LPR+"&QueryYear=@ViewBag.QueryYear&QueryMonth=@ViewBag.QueryMonth","车辆月进煤详情")
                 }
             }
        });

        $("#StatList").datagrid('load', {
            QueryYear: @Html.Raw(ViewBag.QueryYear),
            QueryMonth: @Html.Raw(ViewBag.QueryMonth),
            Day: @Html.Raw(ViewBag.Day),
            MATERIEL_ID:'@Html.Raw(ViewBag.MATERIEL_ID)',
            SUPPLIER_ID: '@Html.Raw(ViewBag.SUPPLIER_ID)',
            TRANSPORT_ID: '@Html.Raw(ViewBag.TRANSPORT_ID)'
            });
    });
</script>